package com.qianfeng.smartplatform.controller.advices;

import com.qianfeng.smartplatform.dto.R;
import com.qianfeng.smartplatform.service.impl.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/menus")
public class MenuController {

    private MenuService menuService;

    @Autowired
    public void setMenuService(MenuService menuService){this.menuService=menuService;}

    @PostMapping("/menu/enable")
    public R updateEnable(String enbale, String menuId) {
        menuService.updateMenuEnable(enbale, menuId);
        return R.setOK();
    }
}

